int ctmp;
int rindex = 0;
int species[SPECIES]				={0};
int reactants[REACTIONS][SPECIES]	= {0};
int products[REACTIONS][SPECIES]	= {0};
int dif[REACTIONS][SPECIES]			= {0};
float w[REACTIONS]					= {0};
float c[REACTIONS]					= {0};

float ta = 1.0;								//binding probability
float tda= 0.0001;							//unbinding probability
float tdg= 0.00001;							//degradation probability

float r_vp16_vp16     = 0.0001;				//fully activated transcription
float r_vp16          = 0.75*r_vp16_vp16;	//partly activated trascription
float r_vp16_krab     = 0.01*r_vp16_vp16;	//competitive binding

float tk = 4.0;								//KRAB right of way

float ia  = 1.0;							//inducer molecule binding
float pa  = 1.0;							//inducible protein binding
float pda = 0.0001;							//inducible protein unbinding
float pdg = 0.00001;						//inducible protein degradation

float rdg    = 0.00001;						//reporter degradation
float cta    = 0.5*r_vp16_vp16;				//constitutive promoter transcription


/*Species*/
#define BFP				0
#define mCITRINE		1
#define TALA_KRAB		2
#define TALA_VP16		3
#define TALB_KRAB		4
#define TALB_VP16		5
#define PIP_KRAB				6
#define E_KRAB					7
#define P0						8
#define P0_TALA_KRAB			9
#define P0_TALA_VP16			10	
#define P0_TALA_VP16_KRAB		11	
#define P0_TALA_KRAB_KRAB		12
#define P0_TALA_VP16_VP16		13
#define P1						14
#define P1_TALA_KRAB			15
#define P1_TALA_VP16			16	
#define P1_TALA_VP16_KRAB		17	
#define P1_TALA_KRAB_KRAB		18
#define P1_TALA_VP16_VP16		19
#define P2						20
#define P2_TALB_KRAB			21
#define P2_TALB_VP16			22
#define P2_TALB_VP16_KRAB		23
#define P2_TALB_KRAB_KRAB		24
#define P2_TALB_VP16_VP16		25
#define P3						26
#define P3_TALB_KRAB			27
#define P3_TALB_VP16			28
#define P3_TALB_VP16_KRAB		29
#define P3_TALB_KRAB_KRAB		30
#define P3_TALB_VP16_VP16		31
#define P4						32
#define P4_PIP_KRAB				33
#define P5						34
#define P5_PIP_KRAB				35
#define P6						36
#define P6_E_KRAB				37
#define P7						38
#define P7_E_KRAB				39
#define P8						40
#define P9						41
#define iPC						42
#define iEC						43
#define iPC_PIP_KRAB			44
#define iEC_E_KRAB				45

	

/*Species*/

species[iPC] = (atoi(argv[2])==1)*INDMAX;
species[iEC] = (atoi(argv[2])==2)*INDMAX;

/*
species[P0] = 50;
species[P1] = 10;
species[P2] = 50;
species[P3] = 10;
species[P4] = 100;
species[P5] = 100;
species[P6] = 100;
species[P7] = 100;
species[P8] = 150;
species[P9] = 150;
*/


//Exp 1
//Competitive binding of TAL effectors
//Koliko je molsko razmerje TAL/VEKTOR?
species[P0] = 50;
species[P8] = atoi(argv[4]);  //CMV_TALA_KRAB
species[P9] = atoi(argv[5]); //CMV_TALA_VP16



/*Pmin 0 TAL BINDING*/
//0
reactants[rindex][P0] = 1; reactants[rindex][TALA_VP16] = 1; 
products[rindex][P0_TALA_VP16] = 1;
c[rindex] = ta;  rindex++;
reactants[rindex][P0_TALA_VP16] = 1;
products[rindex][TALA_VP16] = 1; products[rindex][P0] = 1; 
c[rindex] = tda;  rindex++;

//2
reactants[rindex][P0] = 1; reactants[rindex][TALA_KRAB] = 1; 
products[rindex][P0_TALA_KRAB] = 1;
c[rindex] = ta*tk;  rindex++;
reactants[rindex][P0_TALA_KRAB] = 1;
products[rindex][TALA_KRAB] = 1; products[rindex][P0] = 1; 
c[rindex] = tda;  rindex++;

//4
reactants[rindex][P0_TALA_VP16] = 1; reactants[rindex][TALA_KRAB] = 1; 
products[rindex][P0_TALA_VP16_KRAB] = 1;
c[rindex] = ta*tk;  rindex++;
reactants[rindex][P0_TALA_VP16_KRAB] = 1;
products[rindex][P0_TALA_VP16] = 1; products[rindex][TALA_KRAB] = 1; 
c[rindex] = tda;  rindex++;

//6
reactants[rindex][P0_TALA_KRAB] = 1; reactants[rindex][TALA_VP16] = 1; 
products[rindex][P0_TALA_VP16_KRAB] = 1;
c[rindex] = ta;  rindex++;
reactants[rindex][P0_TALA_VP16_KRAB] = 1;
products[rindex][P0_TALA_KRAB] = 1; products[rindex][TALA_VP16] = 1; 
c[rindex] = tda;  rindex++;


//Competitive binding
reactants[rindex][P0_TALA_KRAB] = 1; reactants[rindex][TALA_KRAB] = 1; 
products[rindex][P0_TALA_KRAB_KRAB] = 1;
c[rindex] = ta*tk;  rindex++;
reactants[rindex][P0_TALA_KRAB_KRAB] = 1;
products[rindex][P0_TALA_KRAB] = 1; products[rindex][TALA_KRAB] = 1; 
c[rindex] = tda;  rindex++;

reactants[rindex][P0_TALA_VP16] = 1; reactants[rindex][TALA_VP16] = 1; 
products[rindex][P0_TALA_VP16_VP16] = 1;
c[rindex] = ta;  rindex++;
reactants[rindex][P0_TALA_VP16_VP16] = 1;
products[rindex][P0_TALA_VP16] = 1; products[rindex][TALA_VP16] = 1; 
c[rindex] = tda;  rindex++;


/*Transcription*/
//
//32
reactants[rindex][P0_TALA_VP16] = 1; products[rindex][P0_TALA_VP16] = 1;
products[rindex][TALB_KRAB] = 1; products[rindex][BFP] = 1;
c[rindex] = r_vp16;  rindex++;
//33
reactants[rindex][P0_TALA_VP16_KRAB] = 1; products[rindex][P0_TALA_VP16_KRAB] = 1;
products[rindex][TALB_KRAB] = 1; products[rindex][BFP] = 1;
c[rindex] = r_vp16_krab;  rindex++;

reactants[rindex][P0_TALA_VP16_VP16] = 1; products[rindex][P0_TALA_VP16_VP16] = 1;
products[rindex][TALB_KRAB] = 1; products[rindex][BFP] = 1;
c[rindex] = r_vp16_vp16;  rindex++;

/*Level 3*/

reactants[rindex][P8] = 1; products[rindex][P8] = 1; 
products[rindex][TALA_KRAB] = 1;
c[rindex] = cta;  rindex++;

reactants[rindex][P9] = 1; products[rindex][P9] = 1; 
products[rindex][TALA_VP16] = 1;
c[rindex] = cta;  rindex++;


/*Degradation*/
reactants[rindex][BFP] = 1; 
c[rindex] = rdg;  rindex++;
reactants[rindex][mCITRINE] = 1; 
c[rindex] = rdg;  rindex++;
reactants[rindex][TALA_KRAB] = 1; 
c[rindex] = tdg;  rindex++;
reactants[rindex][TALA_VP16] = 1; 
c[rindex] = tdg;  rindex++;
reactants[rindex][TALB_KRAB] = 1; 
c[rindex] = tdg;  rindex++;
reactants[rindex][TALB_VP16] = 1; 
c[rindex] = tdg;  rindex++;
reactants[rindex][PIP_KRAB]	= 1; 
c[rindex] = tdg;  rindex++;
reactants[rindex][E_KRAB]	= 1; 
c[rindex] = tdg;  rindex++;

/*
printf("%d\n",rindex);


//Weights;
int ii;
int jj;
for(ii=0; ii<REACTIONS; ii++){
	printf("w[%d] = c[%d] ",ii,ii,ii);
	for(jj=0; jj<SPECIES; jj++){
		if(reactants[ii][jj] > 0) printf("* species[%d]", jj);
	}
	printf(";\n");
}
exit(0);
*/